Repository navigation
Conversation
Collaborator
|
Change this to work on the v1 branch |
CG-5228
force-pushed
the
oss-agent/issue-776
branch
2 times, most recently
from
October 18, 2026 03:06
434bd63 to
78246b6
Compare
CG-5228
force-pushed
the
oss-agent/issue-776
branch
from
October 20, 2026 00:24
78246b6 to
de8e9e3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #776
Root Cause: DiagnosticFilterer only supported filtering diagnostics by numeric or string diagnostic codes (
codes) and file globs (filesin v1,srcin v0 compatibility mode), lacking support for filtering diagnostics by severity (error,warn/warning,info/information,hint). Additionally, if a filter object specified an empty or all-invalidseveritiesarray (e.g.,{ "files": "vendor/**/*", "severities": [] }), normalizing empty arrays toundefinedcould cause the filter to be treated as a file-only filter and accidentally suppress all diagnostics in matching files.Fix: Added
BsDiagnosticSeveritytype andseverities/severityproperties toBsConfig.diagnosticFilters(src/BsConfig.tsandbsconfig.schema.json), implemented severity normalization and filtering insrc/DiagnosticFilterer.tsandsrc/DiagnosticManager.ts(supporting global,files/src/dest-scoped, negative-glob, and combinedcodes+severitieslogical-AND filters while preserving emptyseverities: []arrays so they match zero diagnostics rather than collapsing to file-wide suppression), documented severity filtering indocs/bsconfig.md, and added comprehensive unit tests insrc/DiagnosticFilterer.spec.ts.Files Modified
bsconfig.schema.jsondocs/bsconfig.mdsrc/BsConfig.tssrc/DiagnosticFilterer.spec.tssrc/DiagnosticFilterer.tssrc/DiagnosticManager.tsVerification Performed (Isolated Container Sandbox)
79f2aa6796c18922c4f7a33da294a538a04ed43enode:22-bookworm(--network none --read-only --cap-drop ALL)npm run test:nocover && npm run lint && npm run buildAcceptance Criteria Verification
error,warn/warning,info/information,hint) globally and per file glob (filesand v0src) — verified (Verified by unit tests in src/DiagnosticFilterer.spec.ts)severities: []) do not accidentally suppress all diagnostics in matching files or mark files as completely filtered — verified (Verified by 4 dedicated unit tests in src/DiagnosticFilterer.spec.ts (empty severity arrays, invalid severity names, empty severities combined with codes, negative filters with empty severities))